home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_bab_framemove.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  52 lines

  1. # Jedi Knight Cog Script
  2. #
  3. # 00_AIFrameMove.cog
  4. #
  5. # Like AIFramePatrol but just one way, triggered by entry into a sector
  6. #
  7. # [RD]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13. message    activated
  14. message    arrived
  15.  
  16. surface    trigger
  17.  
  18. thing        mover
  19.  
  20. float        patrolspeed=1    // defaults to walk
  21. float        numframes=1        // total frames, not including frame 0
  22.  
  23. int        curframe=1        local
  24. int        begun=0        local
  25. end
  26.  
  27. # ========================================================================================
  28.  
  29. code
  30.  
  31. activated:
  32.     if (begun) return;
  33.     
  34.     begun = 1;
  35.     AISetMoveSpeed(mover, patrolspeed);
  36.     AISetLookFrame(mover, curframe);
  37.     AISetMoveFrame(mover, curframe);
  38.     return;
  39.     
  40. # ........................................................................................
  41.  
  42. arrived:
  43.     curframe = curframe + 1;
  44.     if (curframe > numframes) return;
  45.  
  46.     AISetLookFrame(mover, curframe);
  47.     AISetMoveFrame(mover, curframe);
  48.     return;
  49.  
  50. end
  51.  
  52.